Data Flow Analysis using Program Graphs

نویسندگان

  • Michal Terepeta
  • Hanne Riis Nielson
  • Andrzej Napieralski
چکیده

Static code analysis is a powerful formal method of analysing software without actually executing any code. It is very commonly used in compilers, but also for bug detection and software verification purposes. Moreover, because of the complexity of today’s software, it is becoming more and more popular as a way for ensuring higher code quality. Data Flow Analysis is a technique for statically gathering/predicting the possible sets of values at various points in the program, that would arise at the program execution. In the standard approach the analysed program is transformed into a flow graph, where labeled blocks are nodes and edges represent control flow. Such a graph is then the basis for various analyses. This thesis explores the idea of using program graphs for that purpose. In this case the blocks/actions are associated with the edges and the nodes are simply labels. One of the main advantages of this approach is the ability to easily compose multiple graphs and then analyse the resulting one. So by redefining some classical analyses to work on program graphs, it is possible not only to analyse sequential programs, but also shared memory environments with concurrently executing processes. The thesis defines the program graphs, shows how they can be then merged and presents their semantics. It uses a simple imperative programming language While and elaborates on how programs can be transformed into a program graphs. Moreover it redefines a number of classical analyses to work on such graphs, including Reaching Definitions, Live Variables and Constant Propagation. Finally, some interesting examples of analysing well known algorithms are

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Using Verified Data-Flow Analysis-based Optimizations in Attribute Grammars

Building verified compilers is difficult, especially when complex analyses such as type checking or data-flow analysis must be performed. Both the type checking and program optimization communities have developed methods for proving the correctness of these processes and developed tools for using, respectively, verified type systems and verified optimizations. However, it is difficult to use bo...

متن کامل

Specialization of Imperative Programs Through Analysis of Relational Expressions

An inter-procedural data flow analysis operating on control flow graphs and collecting information about program expressions is described in this paper. The following relational and other expressions are analyzed: equivalences between program expressions and constants; linear-ordering inequalities between program expressions and constants; equalities originating from some program assignments; a...

متن کامل

Building Program Understanding Tools Using Visitor Combinators

Program understanding tools manipulate program representations, such as abstract syntax trees, control-flow graphs, or data-flow graphs. This paper deals with the use of visitor combinators to conduct such manipulations. Visitor combinators are an extension of the well-known visitor design pattern. They are small, reusable classes that carry out specific visiting steps. They can be composed in ...

متن کامل

Source model analysis using the JJTraveler visitor combinator framework

Program understanding tools manipulate program representations, such as abstract syntax trees, controlflow graphs, or data-flow graphs. This paper deals with the use of visitor combinators to conduct such manipulations. Visitor combinators are an extension of the well-known visitor design pattern. They are small, reusable classes that carry out specific visiting steps. They can be composed in d...

متن کامل

Code generation by using integer-controlled dataflow graph

Integer-Controlled Dataflow (IDF) and its code generation applications in Ptolemy are presented. In IDF graphs, which specify data processing systems, data token flow is controlled by integer control tokens and states of actors at run-time. The firing order of actors (schedule) is determined at compile-time, however, the actors are conditionally activated at run-time. This static schedule contr...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010